vcTopologyPickService

TopologyPickService provides options for handling the selection and creation of points, lines, and curves using the interactiveTopologyPick command.

See in: Overview

Module: vcCore

Parent: -

Children -

Referenced by: vcApplication.TopologyPickService

Properties

Learn how to use properties here. The properties are also inherited from the parent class.

NameTypeAccessDescription
ContinuousModeBooleanRWGets or sets the use of continuous curve selection in 3D world.
SnapOnCurveBooleanRWGets or sets the ability to select a curve.
SnapOnCurveLoopBooleanRWGets or sets the ability to select a curve loop.
SnapOnSurfaceBooleanRWGets or sets the ability to select a point on a face.
TargetAvailableBooleanRGets if pointing at a valid target.
TargetCurveAvailableBooleanRGets if pointing at an available curve.
TargetCurveIndexIntegerRGets the index of an available curve.
TargetCurveLoopAvailableBooleanRGets if pointing at an available curve loop.
TargetCurveLoopIndexIntegerRGets the index of an available curve loop.
TargetCurveslist[vcPickedTopologyCurveInfo]RGets a list of vcPickedTopologyCurveInfo for target.
TargetGeometrySetvcObjectRGets geometry set of a target.
TargetLockedBooleanRGets if target has been selected in 3D world.
TargetNodevcObjectRGets the node containing target.
TargetNormalvcVectorRIf available, gets surface normal of target.
TargetNormalAvailableBooleanRGets if surface normal is available for target.
TargetPositionvcVectorRGets the position vector of target in World coordinate system.
TargetSurfaceAvailableBooleanRGets if pointing at an available point on surface.
TargetSurfaceIndexIntegerRGets the index of an available surface.

Methods

Learn how to use methods here. The methods are also inherited from the parent class.

NameReturn TypeParametersDescription
executeNoneNoneRuns the TopologyPickService.

Events

Learn how to use events here. The events are also inherited from the parent class.

NameParametersDescription
OnTargetAvailableNoneTriggered when pointing at an available target.
See more
The command itself is passed as an event argument, thereby providing access to updated property values.
OnTargetSetNoneTriggered when a valid target has been selected in 3D world.
See more
The command itself is passed as an event argument, thereby providing access to updated property values.

Example: Topology Selection Continuous

"""Implement continuous selection with the vcTopologyPickService and print target curves."""
import vcCore as vc

def target_set():
    print("TargetSet")
    for curve_info in cmd.TargetCurves:
        print(curve_info)

app = vc.getApplication()
cmd = app.TopologyPickService
cmd.ContinuousMode = True
cmd.OnTargetSet += target_set
cmd.execute()